#pragma once
#include "Connection.h"

class CDBService : public CConnection
{
protected:
	virtual void RegisteMessage();
	virtual xgc_lpvoid CreateUserdata( net::network_t h );
	virtual void DestroyUserdata( xgc_lpvoid userdata );

public:
	void StartServer( xgc_lpcstr address, xgc_uint16 port, xgc_uint16 test_invent, xgc_uint16 timeout );
	void StopServer();

private:
	xgc_long_ptr mServer;

};

int ProcessLogin( net::network_t h, xgc_lpvoid u, const unsigned char* data, size_t size );